//
//  KnowList_SecViewController.m
//  CookGuest
//
//  Created by LiuYanJun on 15/9/18.
//  Copyright (c) 2015年 杨元石. All rights reserved.
//

#import "KnowList_SecViewController.h"

#define WIDTH ([UIScreen mainScreen].applicationFrame.size.width)
#define HEIGHT ([UIScreen mainScreen].applicationFrame.size.height)

@interface KnowList_SecViewController ()

@property (nonatomic, retain) UIWebView *webView;


@end

@implementation KnowList_SecViewController


-(void)viewWillAppear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden = YES;
}


-(void)viewWillDisappear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden = NO;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = self.getTitle;
    
    self.webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, WIDTH, HEIGHT)];
    [self.view addSubview:self.webView];
    self.webView.scrollView.bounces = NO;
    //    self.webView.scrollView.showsVerticalScrollIndicator = NO;
    [self.webView loadHTMLString:self.getHtml baseURL:nil];
    
    
    
    UIButton * leftButton = [UIButton buttonWithType:UIButtonTypeCustom];
    leftButton.frame = CGRectMake(0, 0, 30, 20);
    [leftButton addTarget:self action:@selector(leftClick) forControlEvents:UIControlEventTouchUpInside];
    [leftButton setBackgroundImage:[UIImage imageNamed:@"backk.png"] forState:UIControlStateNormal];
    UIBarButtonItem * custom = [[UIBarButtonItem alloc]initWithCustomView:leftButton];
    self.navigationItem.leftBarButtonItem = custom;
    
    // Do any additional setup after loading the view.
}


-(void)leftClick
{
    [self.navigationController popViewControllerAnimated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
